package com.study.dao;

import com.study.entity.system.RoleAndUserRelations;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * 用户和角色关联
 * @Author wfw
 * @Date 2020/07/13 13:37
 */
public interface UserAndRoleRelationsDao extends JpaRepository<RoleAndUserRelations, String>, JpaSpecificationExecutor<RoleAndUserRelations> {
    /**
     * 根据用户id查询对应的角色id
     */
    List<RoleAndUserRelations> findByUserId(String userId);
}
